//
//  MyObject.h
//  helloworld
//
//  Created by didi on 04/06/2024.
//

#ifndef MyObject_h
#define MyObject_h
  
#import <Foundation/Foundation.h>
  
// 协议定义
@protocol ColorfulObject
- (void)setColorToRed:(float)red green:(float)green blue:(float)blue;
@end
  
// 类定义
@interface MyObject : NSObject <ColorfulObject>
  
// 属性定义
@property (nonatomic, assign) float redComponent;
@property (nonatomic, assign) float greenComponent;
@property (nonatomic, assign) float blueComponent;
  
// 方法定义
- (void)displayColor;
  
@end
  
// 分类定义
@interface MyObject (PrivateMethods)
- (void)setInternalColorComponentsWithRed:(float)red green:(float)green blue:(float)blue;
@end
  
// 枚举定义
typedef NS_ENUM(NSInteger, MyObjectStatus) {
    MyObjectStatusIdle,
    MyObjectStatusBusy,
    MyObjectStatusError
};


@interface TestObject : NSObject
  
- (NSMutableArray *)getArray;
- (id)getObjectToInsert;
  
@end

#endif /* MyObject_h */
